"""Definition of the infofolder content type
"""

from zope.interface import implements

from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-

from my315ok.xtinfocontent.interfaces import Iinfofolder
from my315ok.xtinfocontent.config import PROJECTNAME

infofolderSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

infofolderSchema['title'].storage = atapi.AnnotationStorage()
infofolderSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(
    infofolderSchema,
    folderish=True,
    moveDiscussion=False
)


class infofolder(folder.ATFolder):
    """contained all kinds of information"""
    implements(Iinfofolder)

    meta_type = "infofolder"
    schema = infofolderSchema

    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')

    # -*- Your ATSchema to Python Property Bridges Here ... -*-

atapi.registerType(infofolder, PROJECTNAME)
